package ${groupId}.${projectName};

import com.gzkit.baseframework.core.persistence.BaseMapper;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.WebApplicationInitializer;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * 可执行jar方式启动后，可访问 {@link http://localhost:15000/swagger-ui.html}验证后台启动是否成功
 */
@SpringBootApplication
@EnableTransactionManagement
@EnableEncryptableProperties
@ComponentScan(basePackages = "com.gzkit")
@MapperScan(basePackages = {"com.gzkit"},markerInterface= BaseMapper.class,annotationClass = Mapper.class)
public class ${classProjectName}Application extends SpringBootServletInitializer implements WebApplicationInitializer {

	public static void main(String[] args) {
		SpringApplication.run(${classProjectName}Application.class, args);
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(${classProjectName}Application.class);
	}
}
